<template>
	<view>
		<view class="list_wrap_content">
			<view class="list_wrap">
				<view class="left_head"><image mode="widthFix" :src="itemLis.userpic"></image></view>
				<view class="user_list">
					<view class="user_name">
						<view class="left_user">
							{{ itemLis.username }}
							<view class="level">
								<text class="level_icon iconfont icon-jibie"></text>
								{{ itemLis.age }}
							</view>
						</view>
						<view class="guanzhu_box" @click="clickGuanzhu" v-if="!item.isguanzhu">
							<view class="guanzhu">+ 关注</view>
							<view class="del_icon iconfont icon-x"></view>
						</view>
					</view>
					<view class="text">{{ itemLis.title }}</view>
				</view>
			</view>
			<view class="show_image">
				<view class="img" v-if="itemLis.titlepic"><image :src="itemLis.titlepic"></image></view>
				<view class="play_icon iconfont icon-bofang"></view>
				<view class="play_num" v-if="itemLis.video.looknum">{{ itemLis.video.looknum }} 次播放{{ itemLis.video.long }}</view>
			</view>
			<view class="footer_wrap">
				<view class="left_address">{{ itemLis.path }}</view>
				<view class="r_share">
					<view class="a">
						<view class="share_box ">
							<view class="icona iconfont icon-forward-null"></view>
							<text>{{ itemLis.sharenum }}</text>
						</view>
						<view class="share_box">
							<view class="icona iconfont icon-xinxi"></view>
							<text>{{ itemLis.commentnum }}</text>
						</view>
						<view class="share_box">
							<view class="icona iconfont icon-xiaolian1"></view>
							<text>{{ itemLis.goodnum }}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props: ['itemLis', 'index'],
	data() {
		return {
			item: this.itemLis
		};
	},
	methods: {
		//点击关注
		clickGuanzhu() {
			this.item.isguanzhu = true;
			uni.showToast({
				title: '关注成功'
			});
		}
	}
};
</script>

<style lang="less" scoped>
.list_wrap_content {
	border-bottom: 2rpx solid #ccc;
	margin-top: 15rpx;
}
.list_wrap {
	display: flex;
	.left_head {
		flex: 1;
		padding: 20rpx;
		image {
			height: 100rpx;
			width: 100rpx;
			border-radius: 50%;
		}
	}
	.user_list {
		flex: 5;
		.user_name {
			display: flex;
			justify-content: space-between;
			padding: 20rpx 20rpx 0 0;
			height: 30rpx;
			align-items: center;
			.left_user {
				color: #b2b2b2;
				.level {
					display: inline-block;
					height: 30rpx;
					width: 60rpx;
					background-color: #44b3ff;
					color: #ffffff;
					border-radius: 20rpx;
					font-size: 20rpx;
					line-height: 30rpx;
					text-align: center;
					vertical-align: middle;
					margin-left: 10rpx;
					.level_icon {
						font-size: 20rpx;
					}
				}
			}
			.guanzhu_box {
				display: flex;
				.guanzhu {
					height: 40rpx;
					width: 90rpx;
					background-color: #f4f4f4;
					border: 1rpx solid #cccccc;
					border-radius: 25rpx;
					text-align: center;
					line-height: 40rpx;
					font-size: 20rpx;
					color: #000;
				}
				.del_icon {
					display: flex;
					align-items: center;
					font-size: 20rpx;
					margin-left: 15rpx;
					color: #d5d5d5;
				}
			}
		}
		.text {
			color: #000;
			margin: 20rpx 0;
			padding-right: 20rpx;
			font-weight: 550;
		}
	}
}
.show_image {
	margin: 0 20rpx;
	position: relative;
	image {
		width: 100%;
	}
}
.footer_wrap {
	display: flex;
	justify-content: space-between;
	margin: 0 20rpx;
	color: #bbbbbb;
	padding: 30rpx 0;
	.r_share {
		.a {
			display: flex;
			.share_box {
				display: flex;
				align-items: center;
				padding: 0 15rpx;
				.icona {
					padding-right: 10rpx;
					display: flex;
				}
			}
		}
	}
}
.play_icon {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 100rpx;
	font-weight: 600;
	color: #ffffff;
}
.play_num {
	position: absolute;
	right: 20rpx;
	bottom: 15rpx;
	color: #dedede;
	background-color: rgba(0, 0, 0, 0.5);
	padding: 5rpx 10rpx;
	font-size: 25rpx;
}
</style>
